Objects Reference

mesh::ray_intersect_test

Prototype

int ray_intersect_test(vector& ro,vector& rd,float rad=0.0f)

Parameters

Parameter Type Description
ro vector& ray origin
rd vector& ray direction
rad float collision radius

Return Value

Returns TRUE if an intersection is found, FALSE for no intersection.

Remarks

This function tests for a collision with the mesh. It is faster then the ray_intersect function as it does not find the closest intersection, but returns at the first intersection encountered.